<template>
	<div class='user-home'>
		<component :is="component" />
	</div>
</template>

<script>
import Parent from './Parent.vue'
import Child from './Child.vue'
export default {
  components: {
    Parent,
    Child,
  },
  computed: {
    component() {
      const user = this.$storeGet('getMyInfo')

      if (user.role === 'parent') {
        return 'Parent'
      }
      return 'Child'
    }
  }
}
</script>
